:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --danger: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --border: #dee2e6;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
} */

/* .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
} */

/* .header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
} */

.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.btn-group {
    display: flex;
    gap: 15px;
}

.custom-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: var(--primary);
    color: white;
}

.custom-btn i {
    font-size: 1.1rem;
}

.custom-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-add {
    background: var(--primary);
}

.btn-edit {
    background: #ff9800;
}

.btn-delete {
    background: var(--danger);
}

.btn-generate {
    background: #4caf50;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* 表单容器样式 - 用于悬浮层 */
.form-container {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.form-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
}

.section-header {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    font-size: 1.2rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.form-content {
    padding: 20px;
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

label.required::after {
    content: '*';
    color: var(--danger);
    font-size: 1.1rem;
    margin-left: 4px;
}

input, textarea, select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.array-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.array-input .item {
    display: flex;
    gap: 10px;
}

.array-input .item input {
    flex: 1;
}

.array-input .item button {
    background: var(--danger);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.array-input .item button:hover {
    background: #c82333;
}

.add-item-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-weight: 600;
    transition: var(--transition);
}

.add-item-btn:hover {
    background: #3aa9d0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

.interactive-response {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 15px;
    border: 1px dashed var(--primary-light);
}

.interactive-response .form-row {
    margin-bottom: 15px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save {
    background: var(--primary);
    color: white;
}

.btn-save:hover {
    background: #3250d4;
}

.btn-cancel {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-cancel:hover {
    background: #f0f2ff;
}

.info-text {
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
    margin-top: 3px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-required {
    background: #ffebee;
    color: var(--danger);
}

.badge-common {
    background: #fff8e1;
    color: #ff9800;
}

.badge-advanced {
    background: #e8f5e9;
    color: #4caf50;
}

.config-preview {
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    white-space: pre;
    overflow-x: auto;
    max-height: 500px;
    margin-top: 20px;
}

.config-key {
    color: #3498db;
}

.config-value {
    color: #2ecc71;
}

.config-comment {
    color: #7f8c8d;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
}